package com.cskaoyan.bean.po;

import com.cskaoyan.bean.marketBean.MarketGoods;
import com.cskaoyan.bean.marketBean.MarketGoodsAttribute;
import com.cskaoyan.bean.marketBean.MarketGoodsProduct;
import com.cskaoyan.bean.marketBean.MarketGoodsSpecification;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@NoArgsConstructor
@Data
public class ZYL_admin_goods_update {
    @JsonProperty("goods")
    private MarketGoods goods;
    @JsonProperty("specifications")
    private List<MarketGoodsSpecification> specifications;
    @JsonProperty("products")
    private List<MarketGoodsProduct> products;
    @JsonProperty("attributes")
    private List<MarketGoodsAttribute> attributes;

   /* @NoArgsConstructor
    @Data
    public static class GoodsDTO {
        @JsonProperty("id")
        private Integer id;
        @JsonProperty("goodsSn")
        private String goodsSn;
        @JsonProperty("name")
        private String name;
        @JsonProperty("categoryId")
        private Integer categoryId;
        @JsonProperty("brandId")
        private Object brandId;
        @JsonProperty("gallery")
        private String[] gallery;
        @JsonProperty("keywords")
        private String keywords;
        @JsonProperty("brief")
        private String brief;
        @JsonProperty("isOnSale")
        private Boolean isOnSale;
        @JsonProperty("sortOrder")
        private Integer sortOrder;
        @JsonProperty("picUrl")
        private String picUrl;
        @JsonProperty("shareUrl")
        private String shareUrl;
        @JsonProperty("isNew")
        private Boolean isNew;
        @JsonProperty("isHot")
        private Boolean isHot;
        @JsonProperty("unit")
        private String unit;
        @JsonProperty("counterPrice")
        private Integer counterPrice;
        @JsonProperty("retailPrice")
        private Integer retailPrice;
        @JsonProperty("addTime")
        private String addTime;
        @JsonProperty("updateTime")
        private String updateTime;
        @JsonProperty("deleted")
        private Boolean deleted;
        @JsonProperty("detail")
        private String detail;
    }*/

    @NoArgsConstructor
    @Data
    public static class SpecificationsDTO {
        @JsonProperty("id")
        private Integer id;
        @JsonProperty("goodsId")
        private Integer goodsId;
        @JsonProperty("specification")
        private String specification;
        @JsonProperty("value")
        private String value;
        @JsonProperty("picUrl")
        private String picUrl;
        @JsonProperty("addTime")
        private String addTime;
        @JsonProperty("updateTime")
        private String updateTime;
        @JsonProperty("deleted")
        private Boolean deleted;
    }

    @NoArgsConstructor
    @Data
    public static class ProductsDTO {
        @JsonProperty("id")
        private Integer id;
        @JsonProperty("goodsId")
        private Integer goodsId;
        @JsonProperty("specifications")
        private String specifications;
        @JsonProperty("price")
        private Integer price;
        @JsonProperty("number")
        private Integer number;
        @JsonProperty("url")
        private String url;
        @JsonProperty("addTime")
        private String addTime;
        @JsonProperty("updateTime")
        private String updateTime;
        @JsonProperty("deleted")
        private Boolean deleted;
    }

    @NoArgsConstructor
    @Data
    public static class AttributesDTO {
        @JsonProperty("id")
        private Integer id;
        @JsonProperty("goodsId")
        private Integer goodsId;
        @JsonProperty("attribute")
        private String attribute;
        @JsonProperty("value")
        private String value;
        @JsonProperty("addTime")
        private String addTime;
        @JsonProperty("updateTime")
        private String updateTime;
        @JsonProperty("deleted")
        private Boolean deleted;
    }
}
